package org.springsource.services.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springsource.dao.AccountDao;
import org.springsource.domain.Account;
import org.springsource.domain.AccountNotFoundException;
import org.springsource.services.AccountService;

@Service
public class AccountServiceImpl implements AccountService {
	@Autowired
	private AccountDao accountDao;
	
	@Override
	public Account getAccount(Long number) throws AccountNotFoundException {
		return accountDao.getAccount(number);
	}

	@Override
	public List<Account> getAccounts() {
		return accountDao.getAccounts();
	}

	@Override
	public void saveOrUpdate(Account account) {
		accountDao.saveOrUpdate(account);
	}

	@Override
	public void delete(Account account) {
		accountDao.delete(account);
	}
	
	

}
